<%@page import="org.springframework.web.servlet.ModelAndView"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
	<meta charset="utf-8">
		
	<title>Cargar archivo</title>
	
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
    </style>
    <link href="css/bootstrap-responsive.css" rel="stylesheet">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
    
	<script>
		function redireccionar(url)
  		{
  			document.f1.action = url;
        	document.f1.submit();	        
 		}
	</script>	
</head>
<body>
	<div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="#">Project name</a>
          <div class="nav-collapse">
            <ul class="nav">
              <li class="active"><a href="#">Home</a></li>
              <li><a href="#about">About</a></li>
              <li><a href="#contact">Contact</a></li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>
    <div class="container">
      <div class="row">
        <div class="span12">
            <form name="f1" action="subirArchivo.html" method="post" enctype="multipart/form-data">
                <section align="center">
                    <p>
                    <div><sdivong>CARGAR ARCHIVO DE USUARIO</sdivong></div>
                    </p>
                    <p>
                        <section>
                            <p>
                            <div><sdivong>Archivo (M&aacute;ximo 10Mb)</sdivong></div>
                            </p>
                            <div>
                                <input type="file" name="archivo" title="Debe ingresar un nombre" required autofocus placeholder="Su nombre..."/>
                            </div>
                            
                            <c:set var="error" value="${requestScope['ERROR']}"/>
                            <div id="mensaje-error">${error }</div>
                            
                            <div><input type="submit" class="boton" value="Subir archivo"/></div>
                            <div><input type="button" class="boton" value="Regresar" onClick="return redireccionar('retorno.html?v=1');"><div>
                        </section>					
                    </p>				
                </section>
                <footer>
                <p>Copyright &copy; 2013  Geeks</p>
                </footer> 
                <section>
                    <c:set var="accion" value="${requestScope['ACCION']}"/>	
                    <div>
                        <input name="txtAccion" type="hidden" value="${accion }"/>
                    </div>
                    <c:set var="idea" value="${requestScope['IDEA']}"/>	
                    <div>
                        <div><input name="txtCodigo" type="hidden" value="${idea.codigo }"/></div>
                    </div>
                    <div>
                        <div><input name="txtTitulo" type="hidden" value="${idea.titulo }"/></div>
                    </div>
                    <div>
                    <div>
                        <div><input name="txtDescripcion" type="hidden" value="${idea.descripcion }"/></div>
                    </div>
                    <div>
                        <div>
                            <div><input name="txtClave1" type="hidden" value="${idea.palabraClave1 }"/></div>
                        </div>
                        <div>
                            <div><input name="txtClave2" type="hidden" value="${idea.palabraClave2 }"/></div>
                        </div>
                        <div>
                            <div><input name="txtClave3" type="hidden" value="${idea.palabraClave3 }"/></div>
                        </div>
                        <div>
                            <div><input name="txtClave4" type="hidden" value="${idea.palabraClave4 }"/></div>
                        </div>
                    </div>
                    <div>					
                        <div><input name="txtArchivo" type="hidden" value="${idea.archivo }"/></div>										
                    </div>				
                </section>
            </form>
            </div>
     	</div>
	</section>
    
    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->

	<script src="js/jquery-1.7.2.min.js"></script>
    <script src="js/bootstrap-transition.js"></script>
    <script src="js/bootstrap-alert.js"></script>
    <script src="js/bootstrap-modal.js"></script>
    <script src="js/bootstrap-dropdown.js"></script>
    <script src="js/bootstrap-scrollspy.js"></script>
    <script src="js/bootstrap-tab.js"></script>
    <script src="js/bootstrap-tooltip.js"></script>
    <script src="js/bootstrap-popover.js"></script>
    <script src="js/bootstrap-button.js"></script>
    <script src="js/bootstrap-collapse.js"></script>
    <script src="js/bootstrap-carousel.js"></script>
    <script src="js/bootstrap-typeahead.js"></script>
</body>
</html>